loadData()

function loadData() {
    let pagenum = 0;
    let pagesize = 6;
    // let url = 'http://jx.xuzhixiang.top/ap/api/allproductlist.php';
    let uid = localStorage.getItem('uid');
    let token = localStorage.getItem('token');

    ajax({
        method: "get",
        url: `http://jx.xuzhixiang.top/ap/api/allproductlist.php`,
        params: {
            pagenum,
            pagesize: 12,
            uid
        },
        success(obj) {
            console.log(obj)
            let arr = obj.data
            console.log(arr)
            let html = ""
            arr.forEach(index => {
                html += ` <li><a href="" class="xqlb_list_a">
    <img src="${index.pimg}" alt="">
</a>
<p class="desc"><a href="xq.html?id=${index.pid}" class="desc_a">${index.pname}</a></p>
<h6>${index.pdesc}</h6>
<p class="xqlb_price">
    <span>￥${index.pprice}</span>
    <span>￥2299</span>
</p>
<p>加入购物车</p>
</li>`


            })
            let list = document.querySelector('.list');
            list.innerHTML = html;







        }
    })

}